<?php
	function RandomNum($new_seed="") {
		static $seed;
		$constant = bcadd(bcpow("2", "13"), "1");
		$prime = 37;
		$max_value = bcpow("2", "50", $scale);
		
		if($new_seed != "") {
			$seed = $new_seed;
		}
		
		if($new_seed == "") {
			$seed = strval(time());
		}
		
		$seed = bcmul($constant, $seed);
		$seed = bcadd($seed, $prime);
		$seed = bcmod($seed, $max_value);
		
		return($seed);
	}
	
	bcscale(0);
	
	for($index=0; $index<10; $index++) {
		print(RandomNum()."<br>");
	}